/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.mes.purchase.order.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;

/**
 * 合同信息表实体类
 *
 * @author BladeX
 * @since 2021-01-04
 */
@Data
@TableName("pur_contract_info")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "ContractInfo对象", description = "合同信息表")
public class ContractInfo extends TenantEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 合同编号
	*/
		@ApiModelProperty(value = "合同编号")
		private String contractNo;
	/**
	* 合同名称
	*/
		@ApiModelProperty(value = "合同名称")
		private String contractName;
	/**
	 * 供应商ID
	 */
	@ApiModelProperty(value = "供应商ID")
	private Long supplierId;
	/**
	 * 供应商名称
	 */
	@ApiModelProperty(value = "供应商编号")
	private String supplierNo;
	/**
	* 供应商名称
	*/
		@ApiModelProperty(value = "供应商名称")
		@JsonSerialize(using = ToStringSerializer.class)
		private String supplierName;
	/**
	* 合同类型
	*/
		@ApiModelProperty(value = "合同类型")
		@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
		private Integer contractType;
	/**
	* 合同签订日期
	*/
		@ApiModelProperty(value = "合同签订日期")
		@JsonSerialize(using = ToStringSerializer.class)
		@DateTimeFormat(
				pattern = "yyyy-MM-dd"
		)
		@JsonFormat(
				pattern = "yyyy-MM-dd"
		)
		private LocalDate contractSignDate;
	/**
	* 合同签订人
	*/
		@ApiModelProperty(value = "合同签订人")
		private String contractSigner;
	/**
	* 合同开始日期
	*/
		@ApiModelProperty(value = "合同开始日期")
		@JsonSerialize(using = ToStringSerializer.class)
		@DateTimeFormat(
				pattern = "yyyy-MM-dd"
		)
		@JsonFormat(
				pattern = "yyyy-MM-dd"
		)
		private LocalDate contractStartDate;
	/**
	* 合同结束日期
	*/
		@ApiModelProperty(value = "合同结束日期")
		@JsonSerialize(using = ToStringSerializer.class)
		@DateTimeFormat(
				pattern = "yyyy-MM-dd"
		)
		@JsonFormat(
				pattern = "yyyy-MM-dd"
		)
		private LocalDate contractEndDate;
	/**
	* 提名信编号
	*/
		@ApiModelProperty(value = "提名信编号")
		private String nlNo;
	/**
	* 备注
	*/
		@ApiModelProperty(value = "备注")
		private String remark;
	/**
	* 申请日期
	*/
		@ApiModelProperty(value = "申请日期")
		private Date applyTime;
	/**
	* 流程定义id
	*/
		@ApiModelProperty(value = "流程定义id")
		private String processDefinitionId;
	/**
	* 流程实例id
	*/
		@ApiModelProperty(value = "流程实例id")
		private String processInstanceId;
	/**
	 * 创建人姓名
	 */
		@ApiModelProperty(value = "创建人姓名")
		private String createUserName;
	/**
	 * 状态
	 */
		@ApiModelProperty(value = "状态")
		@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
		private Integer status;
	/**
	 * 不含税金额
	 */
	@ApiModelProperty(value = "不含税金额")
	@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
	private BigDecimal unTaxAmount;
	/**
	 * 含税金额
	 */
	@ApiModelProperty(value = "含税金额")
	@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
	private BigDecimal taxAmount;
	/**
	 * 税率
	 */
	@ApiModelProperty(value = "税率")
	@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
	private BigDecimal taxRate;

	@ApiModelProperty(value = "是否付款完成")
	private String paymentComplete;

	@ApiModelProperty(value = "数据来源(1,正常合同;2,拟定合同)")
	private Integer dataSource;

	@ApiModelProperty(value = "是否生成采购订单")
	private Integer ifPurchaseOrder;
}
